package fhp.hlhj.giantfold.presenter

import com.lzy.okgo.model.HttpParams
import fhp.hlhj.giantfold.interfaces.ISpendBuy
import fhp.hlhj.giantfold.javaBean.TittleBean
import fhp.hlhj.giantfold.module.SpendBuyModule

/**
 * author: FHP
 * data: on 2018\1\16 0016 11:12
 * E-Mail: 103945089@qq.com
 */
class SpendBuyPresenter(private val iSpendBuy: ISpendBuy) : SpendBuyModule.SpendBuyListener {


    private val module=SpendBuyModule()

    fun getTittles(params: HttpParams){
        module.getTittles(params,this)
    }

    fun getFindGoods(params: HttpParams){
        module.getfindGoods(params,this)
    }
    override fun showLoading() {
        iSpendBuy.showLoading()
    }
    override fun onTittleListener(tittleBean: TittleBean) {
        iSpendBuy.getFirst(tittleBean)
    }

    override fun onFindGoodsListener(tittleBean: TittleBean) {
        iSpendBuy.getFindGoods(tittleBean)
    }
}